﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using AnycleLiu.Common.Tests.Models;
using AnycleLiu.Common.Utils;

namespace AnycleLiu.Common.Tests
{
    [TestFixture]
    public class TestObjectMappingUtil
    {
        private People people;

        [SetUp]
        public void Init()
        {
            people = new People()
            {
                Id = 1022,
                Name = "anycleliu",
                BirthDay = DateTime.Parse("1991/07/06"),
                Height = 165.8F,
                Income = 70000,
                Scores = new List<float>() { 100, 99, 98, 102, 119, 120 },
                Sex = "男"
            };
        }

        [Test]
        public void TestMapping()
        {
            ObjectMappingUtil.PrintObject(people);
            Console.WriteLine("***********************************");
            var man=ObjectMappingUtil.Mapping<People, ManPeople>(people);
            ObjectMappingUtil.PrintObject(man);
        }
    }
}
